from rest_framework import serializers

from goods.models import GoodsVisitCount


class GoodsdayviewsSerializer(serializers.ModelSerializer):
    category = serializers.StringRelatedField(label='类别')

    class Meta:
        model = GoodsVisitCount
        fields = ('category', 'count')
